//
//  BaseController+Search.m
//  ChatDemo-UI2.0
//
//  Created by 王增战 on 2017/2/7.
//  Copyright © 2017年 王增战. All rights reserved.
//

#import "BaseController+Search.h"
#import "HXDDUserEntity.h"
#import "HXRuntimeStatus.h"
#import "EaseChineseToPinyin.h"
@implementation BaseController (Search)
- (BOOL)isChinese:(NSString *)str {
    for(int i=0; i< [str length];i++){
        int a = [str characterAtIndex:i];
        if( a > 0x4e00 && a < 0x9fff)
        {
            return YES;
        }
    }
    return NO;
}

- (BOOL)isAllNum:(NSString *)string {
    if (string.length == 0) {
        return NO;
    }
    unichar C;
    for (int i = 0; i<string.length; i++) {
        C = [string characterAtIndex:i];
        if (!isdigit(C)) {
            return NO;
        }
    }
    return YES;
}

@end
